package com.example.springbootcreatemanual.service.impl;

import com.example.springbootcreatemanual.pojo.EmailProperties;
import com.example.springbootcreatemanual.service.EmailService;
import com.example.springbootcreatemanual.utils.MailUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmailServiceImpl implements EmailService {
    @Autowired
    private EmailProperties emailProperties;
    @Override
    public  boolean send(String to,String title,String content){
        System.out.println("email:"+emailProperties);
        boolean flag = MailUtil.sendMail(emailProperties,to,title,content);
        return flag;
    }
}
